<template>
  <div>
    <TypeNav />
    <ListContainer />
    <Recommend />

    <Rank />
    <Brand />
    <Like />
    <Floor v-for="floor in floorList" :key="floor.id" :list="floor" />
  </div>
</template>

<script>
import { mapState } from "vuex";
//非路由组件在使用的时候分为三大步：定义、注册、使用
import ListContainer from "./ListContainer";
import Recommend from "./Recommend";
import Rank from "./Rank";
import Like from "./Like";
import Brand from "./Brand";
import Floor from "./Floor";

export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: "Home",
  components: {
    ListContainer,
    Recommend,
    Rank,
    Like,
    Brand,
    Floor,
  },

  // eslint-disable-next-line vue/multi-word-component-names

  data() {
    return {};
  },

  mounted() {
    this.$store.dispatch("home/getFloorList");
    // this.$store.dispatch('user/getUserInfo');
  },
  computed: {
    ...mapState("home", ["floorList"]),
  },

  methods: {},
};
</script>

<style lang="scss" scoped></style>
